declare let cc;
/** 事件系統 */
export default class EventSystem extends cc.Component {
    public static on(name: any, callBack: any, target: any) {
        cc.systemEvent.on(name, callBack, target);
    }

    public static emit(name, ...arg: any[]) {
        cc.systemEvent.emit(name, ...arg);
    }

    public static off(name: any, callBack: any, target: any) {
        cc.systemEvent.off(name, callBack, target);
    }

    public static offTarget(target: any) {
        cc.systemEvent.targetOff(target);
    }

    on(name: any, callBack: any, target: any) {
        cc.systemEvent.on(name, callBack, target);
    }

    emit(name: any, ...arg: any[]) {
        cc.systemEvent.emit(name, ...arg);
    }

    off(name: any, callBack: any, target: any) {
        cc.systemEvent.off(name, callBack, target);
    }

    offTarget(target: any) {
        cc.systemEvent.targetOff(target);
    }
}
